package com.sh.learning.demo.common.message;

/**
 * @author songHai
 * @Classname RegistrationMessage
 * @Description
 * @Date 2025/4/30 1:01
 */
public class RegistrationMessage extends AbstractMessage {

    public static RegistrationMessage of(String email, String name) {
        RegistrationMessage msg = new RegistrationMessage();
        msg.name = name;
        msg.email = email;
        msg.timestamp = System.currentTimeMillis();

        return msg;
    }

    @Override
    public String toString() {
        return String.format("[RegistrationMessage: email=%s, name=%s, timestamp=%s]", email, name, timestamp);
    }
}
